<script>
window.onunload = function() {
  // No page cache
}

window.onpageshow = function(e) {
  alert("onpageshow");
  if (!sessionStorage.beganTest) {
    sessionStorage.beganTest = true;
    top.opener.windowLoaded();
  } else {
    top.opener.notifyDone(window == parent ? "FAIL" : "PASS");
  }
}
</script>
